<?php
/**
 * Session schonmal standardmaessig starten
 */
session_start();
error_reporting(E_ALL);

/**
 * Set includepath to the library
 */
$include_path = get_include_path();              
$include_path.= PATH_SEPARATOR . '../library/';
$include_path.= PATH_SEPARATOR . '../application/Models/';
set_include_path($include_path);

/**
 * Includes
 */
require_once 'Kanedo/Application/Controller.php';
require_once 'Kanedo/Router.php';
require_once 'Kanedo/Registry.php';
require_once 'Kanedo/Db/Mysql.php';
require_once 'Kanedo/Db.php';
/**
 * Database Connection
 */

$connector = new Kanedo_Db_Mysql('localhost', 'root', 'norwegen', 'kanedo_cms');
$db = new Kanedo_Db($connector);
$registry = Kanedo_Registry::getInstance();
$registry->db = $db;


/**
 * Seitenbaum global speichern
 */

	require_once 'NavigationTree.php';
    try {
        $tree = new NavigationTree($registry->db, "navigation", 'id_navigation', 'name');
    		$registry->tree = $tree;
    }catch(Kanedo_Db_Exception $e)
    {
        echo $e->getMessage();
    }
		
/**
 * App start!
 * 
 */
$AC = Kanedo_Application_Controller::getInstance();
$AC->loadConfig('./config.ini');
echo $AC->run();


?>